clear all
tempfile tempsave
set seed ${seed}

/****************/
/*Convert to dta*/
/****************/

import sasxport5 "${rawdata}add health/Core Files - Wave I/Wave I In Home Interview Data/allwave1.xpt", clear
save "${temp}allwave1", replace

import sasxport5 "${rawdata}add health/Wave III Education Files/Wave III Primary/Graduation Data/edugrad.xpt", clear
save "${temp}edugrad", replace

import sasxport5 "${rawdata}add health/Wave III Education Files/Wave III Primary/Education Primary/edustd.xpt", clear
save "${temp}edustd", replace

import sasxport5 "${rawdata}add health/Core Files - Wave I/School Information Data/Schinfo.xpt", clear
save "${temp}schinfo", replace

import sasxport5 "${rawdata}add health/Core Files - Wave I/Wave I In-school Questionnaire Data/Inschool.xpt", clear
save "${temp}inschool", replace

import sasxport5 "${rawdata}add health/Core Files - Wave I/Wave I School Administrator Questionnaire Data/Schadm1.xpt", clear
gen scid_94=aschlcde
gen scid_95=aschlcde
gen scid_100=aschlcde
save "${temp}schadm1", replace

import sasxport5 "${rawdata}add health/Wave III Education Files/Wave III Context/Common Core Data/educcd.xpt", clear
gen scid_94=scid
gen scid_95=scid
gen scid_100=scid
save "${temp}educcd", replace

import sasxport5 "${rawdata}add health/Wave III Education Files/Wave III Context/Private School Survey/edupss.xpt", clear
gen scid_94=scid
gen scid_95=scid
gen scid_100=scid
save "${temp}edupss", replace

import sasxport5 "${rawdata}add health/Contextual Files/Wave I, II, III, IV & V Grouping Data/W1_5GRP.xpt", clear
save "${temp}w5group", replace
